home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global gTools, guesses, gBackPack
- set HC to the number of cast "handCursor"
- cursor([HC, HC + 1])
- if getOne(gBackPack, #vmap) = 0 then
- set the visible of sprite 45 to 0
- end if
- if voidp(gTools) then
- set gTools to []
- end if
- set guesses to [[], [], [], []]
- put "(none" into word 1 of field "guess one"
- put "(none" into word 1 of field "guess two"
- put "(none" into word 1 of field "guess three"
- put "0" into field "guess four"
- end
-
- on getATool
- go(the name of cast the castNum of sprite the clickOn)
- end
-
- on oldGetATool
- global gTools
- if count(gTools) = 4 then
- alert("Sorry, you can't carry that many tools.")
- else
- append(gTools, the name of cast the castNum of sprite the clickOn)
- set the locH of sprite the clickOn to -200
- updateStage()
- end if
- end
-
- on showTools
- global gTools, guesses
- deleteAt(guesses, 1)
- append(guesses, gTools)
- put field "guess two" into field "guess one"
- put field "guess three" into field "guess two"
- if field "guess four" = 0 then
- put "(none" into word 1 of field "guess three"
- else
- put "(" & field "guess four" into word 1 of field "guess three"
- end if
- set spriteNum to 3
- repeat with guessNum = 1 to 3
- set guess to getAt(guesses, guessNum)
- repeat with itemNum = 1 to count(guess)
- set toolName to getAt(guess, itemNum)
- put "light " before toolName
- set the castNum of sprite spriteNum to the number of cast toolName
- set spriteNum to spriteNum + 1
- end repeat
- repeat with i = 1 to 4 - count(guess)
- set the castNum of sprite spriteNum to the number of cast "blank"
- set spriteNum to spriteNum + 1
- end repeat
- end repeat
- updateStage()
- repeat with itemNum = 1 to count(gTools)
- set toolName to getAt(gTools, itemNum)
- put "small " before toolName
- set the castNum of sprite spriteNum to the number of cast toolName
- set spriteNum to spriteNum + 1
- puppetSound(the name of cast (the number of cast "marimba1" + itemNum - 1))
- updateStage()
- wait(30)
- end repeat
- repeat with i = 1 to 4 - count(gTools)
- set the castNum of sprite spriteNum to the number of cast "blank"
- set spriteNum to spriteNum + 1
- end repeat
- puppetSound(0)
- set temp to check(gTools)
- if temp = 4 then
- go("win")
- else
- wait(30)
- put temp into field "guess four"
- end if
- end
-
- on wait ticks
- set temp to the timer
- repeat while (the timer - temp) < ticks
- end repeat
- end
-
- on check thisList
- set total to 0
- if getOne(thisList, "pick") <> 0 then
- set total to total + 1
- end if
- if getOne(thisList, "pointy shovel") <> 0 then
- set total to total + 1
- end if
- if getOne(thisList, "drill") <> 0 then
- set total to total + 1
- end if
- if getOne(thisList, "ladder") <> 0 then
- set total to total + 1
- end if
- return total
- end
-